package com.atguigu.juc.day02.rw;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;

public class Demo06WriteThenWrite {

    public static void main(String[] args) {

        ReadWriteLock readWriteLock = new ReentrantReadWriteLock();
        Lock writeLock = readWriteLock.writeLock();

        // 外层写锁
        writeLock.lock();

        // 内层写锁
        writeLock.lock();

    }

}
